package edu.cuit.avatar.inherit;

/**
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/10 9:08
 */
public class GeometricTest {
    public static void main(String[] args) {
        Geometric geometric = new Circle(5);

        System.out.println(geometric.getArea());

        Geometric rectangle = new Rectangle(10, 20);

        System.out.println(equalsArea(geometric, rectangle));

        displayGeometric(geometric);
        displayGeometric(rectangle);
    }


    public static boolean equalsArea(Geometric g1, Geometric g2){
        return g1.getArea() == g2.getArea();
    }

    public static void displayGeometric(Geometric geometric){
        System.out.println("the area is " + geometric.getArea());
        System.out.println("the perimeter is " + geometric.getPerimeter());
    }
}
